﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Home/HomePage.master" AutoEventWireup="true"
    CodeFile="MyCoupons.aspx.cs" Inherits="Home_MyCoupons" %>

<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="Server">
    <title>我的优惠劵</title>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" runat="Server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table2">
                  <tr  class="HeadTitle">
                  <th align="center">优惠劵卡号</th>
                  <th align="center">优惠劵金额</th>
                  <th align="center">过期日期</th>
                  <th align="center">剩余天数</th>
                  <th align="center">使用状态</th>
                  <th align="center" >获得日期</th>
                  </tr>

                  <%
                      if (listOfCoupons != null)
                      {
                          for (int i = 0; i < listOfCoupons.Count; ++i)
                          {
                              UserCouponInfo a = listOfCoupons[i];
                   %>

                  <tr >
                  <td align="center" ><%=a.Coupon.CouponID %></td>
                  <td align="center"><%=Utility.FormatMoneyStr(a.Coupon.CouponMoney)%>元</td>
                  <td align="center"><%=a.Coupon.EndDate.ToString("yyyy-MM-dd")%></td>
                  
                  <td align="center" class="red_bold"><%=a.IsExpired?"<span class=\"red\">已过期</span>":a.剩余天数.ToString()+"天" %> </td>
                  <td align="center" ><%=a.Coupon.UseStatus %></td>
                  <td align="center" ><%=a.UserCoupon.GainDate.ToString("yyyy-MM-dd") %></td>
                  </tr>
                  <%}
                      }
                      else
                      { %>

              <tr>
                  <td align="center" class="pl5" colspan="6">[ 您目前还没有任何优惠劵信息！]</td>
              </tr>
              <%} %>
              </table>
              <br />
</asp:Content>
